﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DevToolBox.Cloud.Common
{
    /// <summary>
    /// Interface to abstract the operations that can be
    /// applied to a manageable object.
    /// </summary>
    /// <example>
    /// A table, a queue or any general purpose reource
    /// which supports creation, deletion and querying of its 
    /// status is a manageable item
    /// </example>
    public interface IManageable
    {
        /// <summary>
        /// Method to create a managed resource
        /// </summary>
        /// <param name="configObject">Create options</param>
        void Create(object configObject);

        /// <summary>
        /// Method to update a managed resource
        /// </summary>
        /// <param name="configObject">Update options</param>
        void Update(object configObject);
        
        /// <summary>
        /// Method to get a status string of the managed resource
        /// </summary>
        /// <param name="key">Unique identifier</param>
        /// <returns>Status string</returns>
        string GetStatus(string key);

        /// <summary>
        /// Method to dispose unmanaged resources
        /// </summary>
        void Dispose();

        /// <summary>
        /// Method to dispose unmanaged resources
        /// </summary>
        void Delete(string key);

    }
}
